package com.zy.net.okhttp

import okhttp3.Callback
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response


internal object OkHttpImpl {

    private val client: OkHttpClient = OkHttpClient()


    fun request(request: Request, responseCallback: Callback) {
        client.newCall(request).enqueue(responseCallback)
    }

    fun execute(request: Request): Response {
        return client.newCall(request).execute()
    }
}